package com.study.demo.gsbean.demo2;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 自定义标签
 * @author: elvin
 * @time: 2019-01-24 09:26
 * @desc:
 **/
public class Start2 {
	public static void main(String[] args){
		ApplicationContext bf = new ClassPathXmlApplicationContext("classpath:demo2/application.xml");
		//User user = (User) bf.getBean("testBean");
		//System.out.println(user);

		Client client = (Client) bf.getBean("client");
		//如果 client配置的时候, 不配置 id, name, 别名, 则按照spring规则生成的名称是: com.study.start.example4.Client#0
		//Client client = (Client) bf.getBean("com.study.start.example4.Client#0");
		System.out.println(client);

	}
}
